package com.telchina.common.enums;

import cn.hutool.core.util.ArrayUtil;

/**
 * 回单类型枚举
 */
public enum ReplyTypeEnum {

    /**
     * 回单
     */
    REPLY_RECEIPT("0", "工单回单"),

    /**
     * 退单
     */
    REPLY_CHARGEBACK("1", "工单退单");



    private final String code;
    private final String info;

    public static ReplyTypeEnum getValueOf(String value) {
        return ArrayUtil.firstMatch(replyType -> replyType.getCode().equals(value), ReplyTypeEnum.values());
    }

    private ReplyTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return this.code;
    }

    public String getInfo() {
        return this.info;
    }
}